.class public abstract Lcom/netease/newsreader/view/Indicator;
.super Landroid/widget/LinearLayout;
.source "Indicator.java"

# interfaces
.implements Landroid/view/animation/Animation$AnimationListener;


# instance fields
.field private VISIBLE_TIME:I

.field private mAnimation:Landroid/view/animation/Animation;

.field private mAutoHide:Ljava/lang/Runnable;

.field private mCurrentItem:I

.field private mHandler:Landroid/os/Handler;

.field private mTotalItems:I

.field private mVisibleTime:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .parameter "context"

    .prologue
    const/4 v1, -0x1

    .line 40
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 22
    const/16 v0, 0x12c

    iput v0, p0, Lcom/netease/newsreader/view/Indicator;->VISIBLE_TIME:I

    .line 24
    iput v1, p0, Lcom/netease/newsreader/view/Indicator;->mTotalItems:I

    .line 26
    iput v1, p0, Lcom/netease/newsreader/view/Indicator;->mCurrentItem:I

    .line 28
    iput v1, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    .line 32
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mHandler:Landroid/os/Handler;

    .line 141
    new-instance v0, Lcom/netease/newsreader/view/Indicator$1;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/Indicator$1;-><init>(Lcom/netease/newsreader/view/Indicator;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mAutoHide:Ljava/lang/Runnable;

    .line 41
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/Indicator;->init(Landroid/content/Context;)V

    .line 42
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v1, -0x1

    .line 35
    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 22
    const/16 v0, 0x12c

    iput v0, p0, Lcom/netease/newsreader/view/Indicator;->VISIBLE_TIME:I

    .line 24
    iput v1, p0, Lcom/netease/newsreader/view/Indicator;->mTotalItems:I

    .line 26
    iput v1, p0, Lcom/netease/newsreader/view/Indicator;->mCurrentItem:I

    .line 28
    iput v1, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    .line 32
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mHandler:Landroid/os/Handler;

    .line 141
    new-instance v0, Lcom/netease/newsreader/view/Indicator$1;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/Indicator$1;-><init>(Lcom/netease/newsreader/view/Indicator;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mAutoHide:Ljava/lang/Runnable;

    .line 36
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/Indicator;->init(Landroid/content/Context;)V

    .line 37
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/view/Indicator;)Landroid/view/animation/Animation;
    .locals 1
    .parameter

    .prologue
    .line 30
    iget-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mAnimation:Landroid/view/animation/Animation;

    return-object v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/view/Indicator;Landroid/view/animation/Animation;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 30
    iput-object p1, p0, Lcom/netease/newsreader/view/Indicator;->mAnimation:Landroid/view/animation/Animation;

    return-void
.end method

.method private init(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 45
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/Indicator;->setFocusable(Z)V

    .line 46
    return-void
.end method


# virtual methods
.method public getCurrentItem()I
    .locals 1

    .prologue
    .line 89
    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->mCurrentItem:I

    return v0
.end method

.method public getTotalItems()I
    .locals 1

    .prologue
    .line 63
    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->mTotalItems:I

    return v0
.end method

.method public move(F)V
    .locals 0
    .parameter "r"

    .prologue
    .line 55
    return-void
.end method

.method public onAnimationEnd(Landroid/view/animation/Animation;)V
    .locals 1
    .parameter "animation"

    .prologue
    .line 160
    const/4 v0, 0x4

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/Indicator;->setVisibility(I)V

    .line 161
    return-void
.end method

.method public onAnimationRepeat(Landroid/view/animation/Animation;)V
    .locals 0
    .parameter "animation"

    .prologue
    .line 164
    return-void
.end method

.method public onAnimationStart(Landroid/view/animation/Animation;)V
    .locals 0
    .parameter "animation"

    .prologue
    .line 167
    return-void
.end method

.method protected abstract onSetCurrentItem()V
.end method

.method protected abstract onSetTotalItems()V
.end method

.method public setAutoHide(Z)V
    .locals 1
    .parameter "autohide"

    .prologue
    .line 129
    if-eqz p1, :cond_0

    .line 130
    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->VISIBLE_TIME:I

    iput v0, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    .line 131
    const/4 v0, 0x4

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/Indicator;->setVisibility(I)V

    .line 136
    :goto_0
    return-void

    .line 133
    :cond_0
    const/4 v0, -0x1

    iput v0, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    .line 134
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/Indicator;->setVisibility(I)V

    goto :goto_0
.end method

.method public setCurrentItem(I)V
    .locals 4
    .parameter "currentItem"

    .prologue
    .line 98
    if-ltz p1, :cond_0

    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->mTotalItems:I

    if-lt p1, v0, :cond_1

    .line 109
    :cond_0
    :goto_0
    return-void

    .line 101
    :cond_1
    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->mCurrentItem:I

    if-eq p1, v0, :cond_0

    .line 102
    iput p1, p0, Lcom/netease/newsreader/view/Indicator;->mCurrentItem:I

    .line 103
    invoke-virtual {p0}, Lcom/netease/newsreader/view/Indicator;->onSetCurrentItem()V

    .line 105
    iget-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/netease/newsreader/view/Indicator;->mAutoHide:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 106
    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    if-lez v0, :cond_0

    .line 107
    iget-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/netease/newsreader/view/Indicator;->mAutoHide:Ljava/lang/Runnable;

    iget v2, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    int-to-long v2, v2

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    goto :goto_0
.end method

.method public setTotalItems(I)V
    .locals 4
    .parameter "totalItems"

    .prologue
    .line 72
    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->mTotalItems:I

    if-eq p1, v0, :cond_0

    .line 73
    iput p1, p0, Lcom/netease/newsreader/view/Indicator;->mTotalItems:I

    .line 74
    invoke-virtual {p0}, Lcom/netease/newsreader/view/Indicator;->onSetTotalItems()V

    .line 76
    iget-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/netease/newsreader/view/Indicator;->mAutoHide:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 77
    iget v0, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    if-lez v0, :cond_0

    .line 78
    iget-object v0, p0, Lcom/netease/newsreader/view/Indicator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/netease/newsreader/view/Indicator;->mAutoHide:Ljava/lang/Runnable;

    iget v2, p0, Lcom/netease/newsreader/view/Indicator;->mVisibleTime:I

    int-to-long v2, v2

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 80
    :cond_0
    const/4 v0, -0x1

    iput v0, p0, Lcom/netease/newsreader/view/Indicator;->mCurrentItem:I

    .line 81
    return-void
.end method
